//
//  ZDShowImage.m
//  0917美物说app
//
//  Created by Apple on 15/9/19.
//  Copyright © 2015年 itcast. All rights reserved.
//

#import "ZDShowImage.h"

@implementation ZDShowImage

- (instancetype) initWithDictionary:(NSDictionary *)dict
{
    if (self = [super init])
    {
        [self setValuesForKeysWithDictionary:dict];
    }
    
    return self;
}

+ (instancetype) showImageWithDictionary:(NSDictionary *)dict
{
    return [[self alloc] initWithDictionary:dict];
}

+ (NSArray *)showImages
{
    NSArray *sourceArray = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"showImage.plist" ofType:nil]];
    
    NSMutableArray *destArray = [NSMutableArray array];
    
    for (NSDictionary *dict in sourceArray)
    {
        ZDShowImage *showImage = [ZDShowImage showImageWithDictionary:dict];
        
        [destArray addObject:showImage];
    }
    
    return destArray;
}

@end
